package com.hqj.demo.service;

import com.hqj.demo.entity.Student;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.List;
@Service
public class UserServiceI implements UserService {
    @Override
    public int addUser(Student stu) {
        System.out.println("插入数据成功");
        return 1;
    }

    @Override
    public int editUser(Student stu) {
        System.out.println("编辑数据成功");
        return 1;
    }

    @Override
    public List<Student> userFind() {
        List<Student> list = new ArrayList<>();
        list.add(new Student("hqj123","123456","男",30));
        System.out.println("查询数据");
        return list;
    }

    @Override
    public int remove(String loginName) {
        System.out.println("删除数据成功");
        int a = 10/0;
        return 1;
    }
}
